# Contributor: psykose <alice@ayaya.dev>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=font-iosevka
pkgver=15.5.2
pkgrel=0
pkgdesc="Versatile typeface for code, from code."
url="https://typeof.net/Iosevka/"
arch="noarch"
options="!check" # no testsuite
license="OFL-1.1"
depends="fontconfig"
subpackages="
	$pkgname-base
	$pkgname-slab
	$pkgname-curly
	$pkgname-curly-slab:curly_slab
	$pkgname-aile
	$pkgname-etoile
	"
source="
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/super-ttc-iosevka-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/super-ttc-iosevka-slab-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/super-ttc-iosevka-curly-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/super-ttc-iosevka-curly-slab-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/super-ttc-iosevka-aile-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/super-ttc-iosevka-etoile-$pkgver.zip
	"

builddir="$srcdir"

package() {
	depends="
		$pkgname-base
		$pkgname-slab
		$pkgname-curly
		$pkgname-curly-slab
		$pkgname-aile
		$pkgname-etoile
	"

	install -Dm644 "$builddir"/*.ttc \
		-t "$pkgdir"/usr/share/fonts/${pkgname#font-}
}

base() {
	pkgdesc="$pkgdesc (Iosevka)"
	amove usr/share/fonts/iosevka/iosevka.ttc
}

slab() {
	pkgdesc="$pkgdesc (Iosevka Slab)"
	amove usr/share/fonts/iosevka/iosevka-slab.ttc
}

curly() {
	pkgdesc="$pkgdesc (Iosevka Curly)"
	amove usr/share/fonts/iosevka/iosevka-curly.ttc
}

curly_slab() {
	pkgdesc="$pkgdesc (Iosevka Curly Slab)"
	amove usr/share/fonts/iosevka/iosevka-curly-slab.ttc
}

aile() {
	pkgdesc="$pkgdesc (Iosevka Aile)"
	amove usr/share/fonts/iosevka/iosevka-aile.ttc
}

etoile() {
	pkgdesc="$pkgdesc (Iosevka Etoile)"
	amove usr/share/fonts/iosevka/iosevka-etoile.ttc
}

sha512sums="
bdb1c0eec2b4cf26bb05f49bae4e3dc2a987e46a1da2b6b96ed3ef3ac80314c1f9a7dc7f2eceb5fd4aa42e1892ff7ac99928835382aa5824c93a7381af664ea0  super-ttc-iosevka-15.5.2.zip
2fd773b90da919ebd7d5e501947ee5573a484eee3895106a89a840da9c1c8bb8ff9b20b0288afac0353ebb41115f6db014c6f1c6c56aa76c17cb90d834d14e97  super-ttc-iosevka-slab-15.5.2.zip
be01211687c2889fc2066f2878c61d3ba1da0a73cc0f1f8e4be1d2908b2894dba122c1b29039120f60212f945b624bdd17367a966168093b2d43458ecf9ad41d  super-ttc-iosevka-curly-15.5.2.zip
110a3c177c52eb10b5447de88fd699333f90b04a2c4bd416f7fc9fdad58ab63d3d6b56279a628a775a2621cdf09505b3586e50a9a5d1faaf7a0ab75bc521992a  super-ttc-iosevka-curly-slab-15.5.2.zip
11d9aeb6aac051492b400de9ab075004d978144bf233fe6945a7378cfb72efd0f4872ad7b84fc4381d8371cc8784a0c1fab67ff6e913abeb42e17f2cc0aa8199  super-ttc-iosevka-aile-15.5.2.zip
6b97cc1c58b9fe169132c7fc5129761810c7896f6b25833d62198e0868a85ad2ecdf4af0f90d4da4b03c8fe2e088b55695305ba6ce55c8f2becdd5b0ddd45954  super-ttc-iosevka-etoile-15.5.2.zip
"
